Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@bugsnag/core
Advanced tools
@bugsnag/core is a core library for the Bugsnag error monitoring service. It provides the essential functionality for capturing and reporting errors in your applications. This package is typically used as a dependency for other Bugsnag notifier packages that are specific to different platforms (e.g., JavaScript, React Native, etc.).
Initializing Bugsnag
This code initializes the Bugsnag client with your API key, allowing you to start capturing and reporting errors.
const Bugsnag = require('@bugsnag/core');
const bugsnagClient = Bugsnag.createClient({ apiKey: 'YOUR_API_KEY' });
Notifying Errors
This code sends a notification to Bugsnag about an error. This is useful for capturing and reporting errors that occur in your application.
bugsnagClient.notify(new Error('Test error'));
Adding Metadata
This code adds custom metadata to the error report, which can be useful for providing additional context about the error.
bugsnagClient.notify(new Error('Test error'), event => {
event.addMetadata('account', {
id: 123,
name: 'Acme Co'
});
});
Breadcrumbs
This code leaves a breadcrumb, which is a log of actions that happened before an error occurred. Breadcrumbs help in understanding the sequence of events leading up to an error.
bugsnagClient.leaveBreadcrumb('User clicked button', { buttonName: 'Submit' });
Sentry is another popular error tracking and monitoring service. It provides similar functionalities to Bugsnag, such as capturing and reporting errors, adding metadata, and breadcrumbs. Sentry also offers additional features like performance monitoring and release tracking.
Rollbar is an error monitoring service that provides real-time error tracking and debugging tools. It offers similar functionalities to Bugsnag, including error notification, metadata addition, and breadcrumbs. Rollbar also provides features like deployment tracking and error grouping.
Airbrake is an error monitoring service that helps you track and fix errors in your applications. It offers similar functionalities to Bugsnag, such as error notification, metadata addition, and breadcrumbs. Airbrake also provides features like performance monitoring and error grouping.
This package contains the core classes and utilities common to the Bugsnag notifier for any JS-based platform:
Client
classEvent
classBreadcrumb
classSession
classconfig
scheme and utilsUnless you are writing your own notifier, it is unlikely that you want to install this module – for the universal error reporting client, see @bugsnag/js.
This package is free software released under the MIT License. See LICENSE.txt for details.
FAQs
Core classes and utilities for Bugsnag notifiers
The npm package @bugsnag/core receives a total of 290,607 weekly downloads. As such, @bugsnag/core popularity was classified as popular.
We found that @bugsnag/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.